package com.nd.sdp.android.lazy;

import com.nd.sdp.android.lazy.di.DaggerPersonComponent;
import com.nd.sdp.android.lazy.fly.IFly;
import com.nd.sdp.android.lazy.ride.IRide;
import dagger.Lazy;

import javax.inject.Inject;

public class Person {

    @Inject
    Lazy<IFly> fly;
    @Inject
    IRide ride;

    @Inject
    Person() {
    }

    private void fly() {
        fly.get().fly();
    }

    private void ride() {
        ride.ride();
    }

    public static void main(String[] args) {
        Person person = DaggerPersonComponent.create()
                .person();
        person.fly();
        person.ride();
        person.fly();
    }

}
